<h2><?php echo $this->translate('TITLE_RECENT_VIEWED_ITEMS');?></h2>
<?php if(count($this->rv_products)):?>
<div class="rv_products">
    <?php foreach ($this->rv_products as $key => $product) :?>
    <div class="rv_product">
        <div class="product_cover">
            <a  href="<?php echo $this->pageUrl(array('target' => 'detail', 'id_product' => $product->id), true) ;?>">
                <img alt="thumbnail" src="<?php echo $product->getPrimaryThumbImageUrl();?>">
            </a>
        </div>
        <div class="product_info">
            <p>
                <a href="<?php echo $this->pageUrl(array('target' => 'detail', 'id_product' => $product->id), true) ;?>">
                    <?php echo $this->escape($product->name) ?>
                </a>
            </p>
            <p class="price_info">
                <span class="price">
                    <?php
                        if($product->price != null){
                            $product_price = Core_Util::formatPrice($this->store->unit_code, $product->price);
                            echo sprintf('%s %s', $product_price, $this->store->getCurrency());
                        } else {
                            echo 'N/A';
                        }
                    ?>
                </span>
            </p>
        </div>
    </div>
    <?php endforeach;?>
</div>
<?php else:?>
<div class="empty_rv_product">
    <?php echo $this->translate('THERE_IS_NO_PRODUCT'); ?>
</div>
<?php endif;?>
